import {NgModule} from '@angular/core';
import {CategoryListComponent} from './category-list.component';
import {GnJsonTableModule, GnRouteGuard, GnTreeModule} from 'geminis-ng';
import {CommonModule} from '@angular/common';
import {CategoryTableButtonComponent} from './category-table-button.component';
import {NzButtonModule} from 'ng-zorro-antd/button';
import {NzIconModule} from 'ng-zorro-antd/icon';
import {RouterModule, Routes} from '@angular/router';
import {CategoryTreeModule} from "../category-tree/category-tree.module";

const routes: Routes = [
  {
    path: '',
    component: CategoryListComponent,
    canActivate: [GnRouteGuard]
  }
];

@NgModule({
  declarations: [
    CategoryListComponent,
    CategoryTableButtonComponent
  ],
  imports: [
    RouterModule.forChild(routes),
    CommonModule,

    NzButtonModule,
    NzIconModule,

    GnTreeModule,
    GnJsonTableModule,

    CategoryTreeModule
  ],
  bootstrap: [CategoryTableButtonComponent]
})

export class CategoryModule {
}
